using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ERPBackend.Models
{
    public class Workshop : BaseModel
    {
        [Required]
        [StringLength(50)]
        public string WorkshopCode { get; set; } = string.Empty;

        [Required]
        [StringLength(255)]
        public string WorkshopName { get; set; } = string.Empty;

        [Required]
        public int DepartmentId { get; set; }

        [ForeignKey("DepartmentId")]
        public Department? Department { get; set; }

        public int? ManagerId { get; set; }

        [ForeignKey("ManagerId")]
        public User? Manager { get; set; }

        [StringLength(50)]
        public string? Phone { get; set; }

        [StringLength(255)]
        public string? Address { get; set; }

        public string? Description { get; set; }

        [Required]
        [Range(0, 1)]
        public byte Status { get; set; } = 1;
    }
}